package repJale;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JSlider;

public class FondoSlider extends JSlider{
	private Image imagen;

    public FondoSlider() {
    	imagen = new ImageIcon("ParaisoSlider.jpg").getImage();
    }
    
    public FondoSlider(String im) {
    	imagen = new ImageIcon(im).getImage();
    }
    
    public void paint(Graphics g) {
        if (imagen != null) {
            g.drawImage(imagen, 0, 0, getWidth(), getHeight(), this);

            setOpaque(false);
        } else {
            setOpaque(true);
        }

        super.paint(g);
    }
}
